Skip to content

Conversation

@anastasiiiaaa
Copy link

@anastasiiiaaa anastasiiiaaa commented Nov 7, 2021

Added vernam_test.rb and vigenere_test.rb
Added vernam_test.rb and vigenere_test.rb

Added vernam_test.rb and vigenere_test.rb
Copy link
Contributor

@Wolwer1nE Wolwer1nE left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, add docs.

length_str=str.length
arr=str.split(" ")
key_arr=string_to_bin(key)
res=Array.new()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

res = []

end
#vigenere decryption
def self.vigenere_decrypt(str,key)
alph=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, extract alph to class variable

Replaced res=Array.new() with res=[]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants